package builder.example;

import java.util.Arrays;

/**
 * @Author：LJ
 * @Description：
 * @Date: 2017/11/27
 * @Modified By:
 */
public class Client2 {
    public static void main(String[] args) {
        BenzBuilder benzBuilder = new BenzBuilder();
        benzBuilder.setSequence(Arrays.asList("start", "stop", "alarm", "enginBoom"));
        benzBuilder.getCarModel().run();
        BWMBuilder bwmBuilder = new BWMBuilder();
        bwmBuilder.setSequence(Arrays.asList("alarm", "stop", "start", "enginBoom"));
        bwmBuilder.getCarModel().run();

        CarBuilder carBuilder = new CarBuilderFactory().createBuilder(BenzBuilder.class);
        carBuilder.setSequence(Arrays.asList("enginBoom", "stop", "alarm", "start"));
        carBuilder.getCarModel().run();
    }
}
